Skip to content

Conversation

@donbarbos
Copy link
Contributor

The idea was proposed in #8774

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, two optional comments below.

Comment on lines 181 to 185
# Remove full-line // comments only
# (Can not remove inline comments)
text = re.sub(r"(?m)^\s*//.*\n?", "", text)
# Remove trailing commas before } or ]
text = re.sub(r",\s*([}\]])", r"\1", text)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could extract this to a new (incomplete) utility function json5_to_json. Might come in useful in the future.

@srittau srittau merged commit 0c45df1 into python:main Jan 15, 2026
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants